home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PCGUIA 117
/
PC Guia 117.iso
/
Software
/
Utils
/
Software2
/
Product11
/
Setup.exe
/
MT-3.16-full-en_US
/
mt-testbg.cgi
< prev
next >
Wrap
Text File
|
2005-03-08
|
987b
|
48 lines
#!/usr/bin/perl -w
use strict;
# Copyright 2001-2005 Six Apart. This code cannot be redistributed without
# permission from www.movabletype.org.
#
# $Id: mt-testbg.cgi 10197 2005-03-09 00:27:57Z ezra $
use strict;
my($MT_DIR);
BEGIN {
if ($0 =~ m!(.*[/\\])!) {
$MT_DIR = $1;
} else {
$MT_DIR = './';
}
unshift @INC, $MT_DIR . 'lib';
unshift @INC, $MT_DIR . 'extlib';
}
local $| = 1;
print "Content-Type: text/html\n\n";
print "<pre>\n\n";
sub pfork {
fork();
}
eval {
local $SIG{__WARN__} = sub { print "**** WARNING: $_[0]\n" };
require MT;
my $mt = MT->new( Config => $MT_DIR . 'mt.cfg')
or die MT->errstr;
print "If you see only one number below, or if you see two and they match, you should add the line\n
LaunchBackgroundTasks 0\n\nto the file mt.cfg.\n\n-------------------\n\n";
my $pid = pfork();
if (defined($pid) && !$pid) {
print "[$$]\n\n";
exit(0);
} else {
print "[$$]\n\n";
}
}